/*
 * Option.java
 *
 *  
 */
package org.msb.finance.data;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 
 * 
 * @author Marc
 * 
 */
public class Option extends Investment {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private Stock stock;

	private Date expiry;

	private BigDecimal strike;

	/**
	 * 
	 */
	private OptionTypeEnum type;

	/**
	 * 
	 */
	public Option() {
		//
	}

	/**
	 * 
	 * @return
	 */
	public Stock getStock() {
		return this.stock;
	}

	/**
	 * 
	 * @param stock
	 */
	public void setStock(Stock stock) {
		this.stock = stock;
	}

	/**
	 * 
	 * @return
	 */
	public Date getExpiry() {
		return (Date) this.expiry.clone();
	}

	/**
	 * 
	 * @param expiry
	 */
	public void setExpiry(Date expiry) {
		this.expiry = (Date) expiry.clone();
	}

	/**
	 * 
	 * @return
	 */
	public BigDecimal getStrike() {
		return new BigDecimal(this.strike.unscaledValue(), this.strike.scale());
	}

	/**
	 * 
	 * @param strike
	 */
	public void setStrike(BigDecimal strike) {
		this.strike = new BigDecimal(strike.unscaledValue(), strike.scale());
	}

	/**
	 * 
	 * @return
	 */
	public OptionTypeEnum getType() {
		return this.type;
	}

	/**
	 * 
	 * @param type
	 */
	public void setType(OptionTypeEnum type) {
		this.type = type;
	}

	/**
	 * 
	 * 
	 * 
	 * @author Marc
	 * 
	 */
	public enum OptionTypeEnum {
		/**
		 * 
		 */
		CALL,

		/**
		 * 
		 */
		PUT;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see org.msb.finance.data.Investment#getApplicableActions()
	 */
	@Override
	public InvestmentAction[] getApplicableActions() {
		// TODO Auto-generated method stub
		return null;
	}
}
